﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BootstrapAdmin.DataAccess.Models.Production;

/// <summary>
/// 产线工站生产信息记录
/// </summary>
[Table("ops_production_station")]
public class ProductionStation
{
    [Key]
    public int Id { get; set; }

    /// <summary>
    /// 工站编码。
    /// </summary>
    [NotNull]
    [Required]
    [Display(Name = "工站")]
    public string? Station { get; set; }

    /// <summary>
    /// 当前工单，完工后清空。
    /// </summary>
    [Display(Name = "当前工单")]
    public string? CurrentOrderNo { get; set; }

    /// <summary>
    /// 当前SN，完工后清空。
    /// </summary>
    [Display(Name = "当前SN")]
    public string? CurrentSN { get; set; }

    /// <summary>
    /// 当前工站完工数量，重复也会计算。
    /// </summary>
    [Display(Name = "完工数量")]
    public int CompletedQty { get; set; }

    /// <summary>
    /// 当前工站合格数量，合格下线 +1，重复也会计算。
    /// </summary>
    [Display(Name = "合格数量")]
    public int QualifiedQty { get; set; }
}
